<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>导航设置</title>
<!-- BEGIN 页面公共文件 -->
<load href="__COMMON__/css/init.css" />
<load href="__COMMON__/css/font-icons.css" />
<load href="__COMMON__/js/jquery.min.js" />
<!-- END 页面公共文件 -->

<!-- BEGIN 当前页面的css 和js -->
<load href="__COMMON__/css/tools/easydialog.css" />
<load href="__ADMIN_CSS__/common.css" />
<load href="__COMMON__/js/tools/Validator.js" />
<load href="__COMMON__/js/tools/easydialog.min.js" />
<!-- END 当前页面的css 和js -->
<style>
.fl{
	float: left;
}
.fr{
	float: right;
}
.formbody{
	margin: 5px 5px;
    padding: 5px 0px;
}
.formbody .tool{
	overflow: hidden;
	width: 100%;
}
.formbody .tool a.btn{
	    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #fff;
    background-color: #009FB3;
    border-color: #009FB3;
}
.formbody table.table{
	width: 100%;
	margin-top: 10px;
}
.formbody table.table th {
    white-space: nowrap!important;
    color: #656565!important;
    font-weight: normal;
    padding: 12px!important;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}
.formbody table.table td{
	margin: 2px;
    padding: 5px!important;
    vertical-align: middle!important;
    border: 1px solid #ddd;
}
.formbody table.table td{
	text-align: center;
	font-size: 14px;
}
.formbody table.table th.list {
    background: #f5f5f5;
    font-weight: bold;
    text-align: center;
    line-height: 1.5;
	font-size: 14px;
	padding: 10px;
}

.formbody table.table td a.op_show{
    display: inline-block;
    width: 32px;
    height: 18px;
    padding: 2px;
	margin: 0 5px;
    border-radius: 10px;
    font-size: 0;
    text-indent: -9999px;
    cursor: pointer;
    background-color: #CCC;
    transition: background .3s ease-out;
}
.formbody table.table td a.op_show i{
	display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #fff;
    margin-left: 0;
    box-shadow: 1px 1px 3px rgba(0,0,0,.6);
	-o-transition: all 0.3s ease-out;
	-ms-transition: all 0.3s ease-out;
	-webkit-transition: all 0.3s ease-out;
	-moz-transition: all 0.3s ease-out;
	transition: all 0.3s ease-out;
}
.formbody table.table td span.op_show_text{
	line-height: 18px;
	display: block;
	font-size: 12px;
	margin-top: 5px;
}
.formbody table.table td span.op_show_text.warn{
	color: #E55015;
}
.formbody table.table td span.op_show_text.ok{
	color: #009FB3;
}
.formbody table.table td a.op_show.enabled i {
    margin-left: 14px;
}
.formbody table.table td a.op_show.enabled {
    background-color: #006cb7;
}
.formbody table.table td a.op_show.enabled:hover {
    background-color: #007bd1;
}
.formbody table.table td span.nav_name{
	float: left;
}
.formbody table.table td img.guid.dragdown{
	cursor: pointer;
	padding: 5px 1px;
	top: 0;
}
.formbody table.table td img.guid{
	float: left;
}
.formbody table.table td div.guid_line{
	float: left;
	height: 21px;
	background: #FF0;
	position:relative;
	margin-right: 5px;
	background: url(/assets/common/images/icons/bg_column.gif) no-repeat left 8px;
}
.formbody table.table td div.sethere{
	width: 12px;
	height: 12px;
	float: left;
}
.formbody table.table tr.bg{	
    background: #F9F9F9;	
}
.formbody table.table tr.none{
	display: none;
}
.formbody table.table td.list-text{
    white-space: nowrap;
    text-align: center;
    line-height: 1.5;
    border-left: 1px solid #ddd;
	width: 200px;
    border-right: 1px solid #ddd;
}
.formbody table.table td.list-text .op_box{
	overflow: hidden;
	padding: 5px 10px;
	text-align: center;
}
.formbody table.table td.list-text  a {
    color: #0A7C89;
	display: inline-block;
	line-height: 35px;
	margin-left: 15px;
    text-decoration: none;
	font-size: 14px;
}
</style>
</head>
<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">    	
      <li><a href="{:U('Index/main')}" title="主页">主页</a></li>
    <li><a href="javascript:void(0)">前段导航设置</a></li>
    </ul>
    <a class="reload" href="javascript:void(0)" onclick="window.location.reload()"><i class="fa fa-refresh"></i>重载此页面</a>
    </div>

    <div class="formbody"> 
    	<div class="tool">
    		<a href="javascript:;" class="btn addnav fl">添加顶级导航</a>
    		<a href="javascript:;" class="btn spread fr">展开所有下级导航</a>
    	</div>
    	<table class="table" cellpadding="0" cellspacing="0" border="0">
    		<thead>
    			<tr id="list-top">
    				<th width="10" class="list">序号</th>
    				<th width="20" class="list">排序</th>
    				<th class="list">导航名称</th>
    				<th class="list">链接地址</th>
    				<th width="80" class="list">打开方式</th>
    				<th width="110" class="list">启用/停用</th>
    				<th class="list">操作</th>
    			</tr>
    		</thead>
    		<tbody>
    			
    			<tr class="column_1">
    				<td>1</td>
    				<td>1</td>
    				<td>
	    				<img src="/assets/common/images/icons/colum1nx.gif" id="img_12" class="guid dragdown">
	    				<span class="nav_name">products</span>
    				</td>
    				<td><a href="http://www.taobao.com" target="_blank">http://www.taobao.com</a></td>
    				<td>新窗口打开</td>
    				<td><a class="op_show" href="javascript:;"bosszone="bofang_button_close"><i></i></a><span class="op_show_text warn">停用</span></td>
    				<td class="list-text">
    					<div class="op_box">
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">设置</a>
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">添加下级导航</a>							
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">删除</a>							
						</div>
    				</td>
    			</tr>
    			
    			<tr class="column_2 column_level_12 tr_list bg none">
    				<td>2</td>
    				<td>1</td>
    				<td>
    				<div class="guid_line" style="width: 30px;"></div>
    				<div class="sethere"></div>
    				<span class="nav_name">products</span>
    				</td>
    				<td><a href="http://www.taobao.com" target="_blank">http://www.taobao.com</a></td>
    				<td>新窗口打开</td>
    				<td><a class="op_show" href="javascript:;"bosszone="bofang_button_close"><i></i></a><span class="op_show_text warn">停用</span></td>
    				<td class="list-text">
    					<div class="op_box">
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">设置</a>
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">添加下级导航</a>							
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">删除</a>							
						</div>
    				</td>
    			</tr>
    			
    			<tr class="column_2 column_level_12 tr_list bg none">
    				<td>2</td>
    				<td>1</td>
    				<td>
    				<div class="guid_line" style="width: 30px;"></div>
    				<img src="/assets/common/images/icons/colum1nx.gif" id="img_21" class="guid dragdown">
    				<span class="nav_name">products</span>
    				</td>
    				<td><a href="http://www.taobao.com" target="_blank">http://www.taobao.com</a></td>
    				<td>新窗口打开</td>
    				<td><a class="op_show" href="javascript:;"bosszone="bofang_button_close"><i></i></a><span class="op_show_text warn">停用</span></td>
    				<td class="list-text">
    					<div class="op_box">
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">设置</a>
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">添加下级导航</a>							
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">删除</a>							
						</div>
    				</td>
    			</tr>
    			
    			<tr class="column_3 column_level_21 tr_list bg none">
    				<td>3</td>
    				<td>1</td>
    				<td>	    				
	    				<div class="guid_line" style="width: 55px;"></div>	    				
    					<div class="sethere"></div>
	    				<span class="nav_name">products</span>
    				</td>
    				<td><a href="http://www.taobao.com" target="_blank">http://www.taobao.com</a></td>
    				<td>新窗口打开</td>
    				<td><a class="op_show" href="javascript:;"bosszone="bofang_button_close"><i></i></a><span class="op_show_text warn">停用</span></td>
    				<td class="list-text">
    					<div class="op_box">
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">设置</a>
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">添加下级导航</a>							
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">删除</a>							
						</div>
    				</td>
    			</tr>    			
    			
    			<tr class="column_3 column_level_21 tr_list bg none">
    				<td>3</td>
    				<td>1</td>
    				<td>	    				
	    				<div class="guid_line" style="width: 55px;"></div>	    				
    					<div class="sethere"></div>
	    				<span class="nav_name">products</span>
    				</td>
    				<td><a href="http://www.taobao.com" target="_blank">http://www.taobao.com</a></td>
    				<td>新窗口打开</td>
    				<td><a class="op_show" href="javascript:;"bosszone="bofang_button_close"><i></i></a><span class="op_show_text warn">停用</span></td>
    				<td class="list-text">
    					<div class="op_box">
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">设置</a>
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">添加下级导航</a>							
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">删除</a>							
						</div>
    				</td>
    			</tr>    			
    			
    			<tr class="column_2 column_level_12 tr_list bg none">
    				<td>2</td>
    				<td>1</td>
    				<td>
    				<div class="guid_line" style="width: 30px;"></div>    				
    				<div class="sethere"></div>
    				<span class="nav_name">products</span>
    				</td>
    				<td><a href="http://www.taobao.com" target="_blank">http://www.taobao.com</a></td>
    				<td>新窗口打开</td>
    				<td><a class="op_show" href="javascript:;"bosszone="bofang_button_close"><i></i></a><span class="op_show_text warn">停用</span></td>
    				<td class="list-text">
    					<div class="op_box">
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">设置</a>
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">添加下级导航</a>							
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">删除</a>							
						</div>
    				</td>
    			</tr>
    			
    			<tr class="column_1">
    				<td>1</td>
    				<td>1</td>
    				<td>
    					<img src="/assets/common/images/icons/colum1nx.gif" id="img_13" class="guid dragdown">
	    				<span class="nav_name">products</span>
    				</td>
    				<td><a href="http://www.taobao.com" target="_blank">http://www.taobao.com</a></td>
    				<td>新窗口打开</td>
    				<td><a class="op_show" href="javascript:;"bosszone="bofang_button_close"><i></i></a><span class="op_show_text warn">停用</span></td>
    				<td class="list-text">
    					<div class="op_box">
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">设置</a>
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">添加下级导航</a>							
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">删除</a>							
						</div>
    				</td>
    			</tr>
    			
    			<tr class="column_2 column_level_13 tr_list bg none">
    				<td>2</td>
    				<td>1</td>
    				<td>
    				<div class="guid_line" style="width: 30px;"></div>    				
    				<img src="/assets/common/images/icons/colum1nx.gif" id="img_14" class="guid dragdown">
    				<span class="nav_name">products</span>
    				</td>
    				<td><a href="http://www.taobao.com" target="_blank">http://www.taobao.com</a></td>
    				<td>新窗口打开</td>
    				<td><a class="op_show" href="javascript:;"bosszone="bofang_button_close"><i></i></a><span class="op_show_text warn">停用</span></td>
    				<td class="list-text">
    					<div class="op_box">
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">设置</a>
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">添加下级导航</a>							
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">删除</a>							
						</div>
    				</td>
    			</tr>
    			
    			<tr class="column_3 column_level_14 tr_list bg none">
    				<td>2</td>
    				<td>1</td>
    				<td>
    				<div class="guid_line" style="width: 55px;"></div>    				
    				<div class="sethere"></div>
    				<span class="nav_name">products</span>
    				</td>
    				<td><a href="http://www.taobao.com" target="_blank">http://www.taobao.com</a></td>
    				<td>新窗口打开</td>
    				<td><a class="op_show" href="javascript:;"bosszone="bofang_button_close"><i></i></a><span class="op_show_text warn">停用</span></td>
    				<td class="list-text">
    					<div class="op_box">
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">设置</a>
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">添加下级导航</a>							
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">删除</a>							
						</div>
    				</td>
    			</tr>
    			
    			<tr class="column_2 column_level_13 tr_list bg none">
    				<td>2</td>
    				<td>1</td>
    				<td>
    				<div class="guid_line" style="width: 30px;"></div>    				
    				<img src="/assets/common/images/icons/colum1nx.gif" id="img_15" class="guid dragdown">
    				<span class="nav_name">products</span>
    				</td>
    				<td><a href="http://www.taobao.com" target="_blank">http://www.taobao.com</a></td>
    				<td>新窗口打开</td>
    				<td><a class="op_show" href="javascript:;"bosszone="bofang_button_close"><i></i></a><span class="op_show_text ok">启用</span></td>
    				<td class="list-text">
    					<div class="op_box">
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">设置</a>
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">添加下级导航</a>							
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">删除</a>							
						</div>
    				</td>
    			</tr>
    			
    			<tr class="column_3 column_level_15 tr_list bg none">
    				<td>2</td>
    				<td>1</td>
    				<td>
    				<div class="guid_line" style="width: 55px;"></div>    				
    				<div class="sethere"></div>
    				<span class="nav_name">products</span>
    				</td>
    				<td><a href="http://www.taobao.com" target="_blank">http://www.taobao.com</a></td>
    				<td>新窗口打开</td>
    				<td><a class="op_show" href="javascript:;"><i></i></a><span class="op_show_text warn">停用</span></td>
    				<td class="list-text">
    					<div class="op_box">
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">设置</a>
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">添加下级导航</a>							
							<a href="{:U('Sysconfig/navManage', array('action'=>'update'))}">删除</a>							
						</div>
    				</td>
    			</tr>
    			
    		</tbody>
    		<tfoot>
    			<tr>
    				<td colspan="7"><a href="javascript:;" class="btn addnav fl" style="color: #0A95A7;margin-left: 15px;padding: 5px 0;"><i class="fa fa-plus"></i>添加顶级导航</a></td>
    			</tr>
    		</tfoot>
    	</table>
	</div>
<style>
#dialog_mask{
	width: 100%;
	height: 100%;
	position: fixed;
	left: 0;
	top: 0;
	background: rgba(111,111,111,.5);
	display: none;
}
#dialog_box{
	overflow: hidden;
	position: absolute;
	left: 0;
	top: 0;
	background: #FFF;
	display: none;
}
#dialog_box .dialog_head{
	height: 31px;
    border-bottom: 1px solid #E5E5E5;
    background: #F3F3F3;
    border-top-left-radius: 5px;
	overflow: hidden;
    border-top-right-radius: 5px;
}
#dialog_box .dialog_head span.dialog_head_text{
	float: left;
    height: 31px;
    color: #4C4C4C;
    font-size: 12px;
    line-height: 31px;
    overflow: hidden;
    margin: 0;
    padding-left: 10px;
    font-weight: bold;
    text-shadow: 0 1px 1px #FFF;
}
#dialog_box .dialog_head a.dialog_close{
    border: 0 none;
    cursor: pointer;
    float: right;
    font-size: 16px;
    height: 28px;
    width: 30px;
	text-align: center;
    position: relative;
}
#dialog_box .dialog_head a.dialog_close i.fa{
	line-height: 28px;
}
#dialog_box .dialog_body{
	padding: 20px 30px;
	border: 1px solid #D8D8D8;
	border-top: none;
}
#dialog_box .dialog_body .dialog_item{
	height: 30px;
	position: relative;
	margin-bottom: 15px;
	line-height: 30px;
	overflow: hidden;
	font-family: "Microsoft Yahei";
}
#dialog_box .dialog_body .dialog_item.botton{
	height: 29px;
    clear: both;
    background: #F3F3F3;
    text-align: right;
    padding: 6px 6px 0 0;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}
#dialog_box .dialog_body .dialog_item label.dialog_label{
	display: block;
	float: left;
	line-height: 30px;
	font-weight: bold;
}
#dialog_box .dialog_body .dialog_item .element{
	float: left;
	margin-left: 15px;
	font-family: "Microsoft Yahei";
}
#dialog_box .dialog_body .dialog_item .element input.ipt{
	width: 188px;
	padding: 0 10px;
	height: 28px;
	border: 1px solid #C8C8C8;
}
#dialog_box .dialog_body .dialog_item .element a.radio{
	color: #058190;
	margin-right: 15px;
	font-family: "Microsoft Yahei";
}
#dialog_box .dialog_body .dialog_item .element a.radio i.fa{
	margin-right: 5px;
	font-size: 15px;
}

#dialog_box .dialog_body .dialog_item button.btn{
	cursor: pointer;
	height: 25px;
	float: right;
	margin-left: 15px;
}
#dialog_box .dialog_body .dialog_item button.bt_tip_hit{
	color: #FFF;
    border: 1px solid #4C92C8;
    background: #56bdf4;
    background: -moz-linear-gradient(top,#56bdf4 0,#46a3d7 100%);
    background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#56bdf4),color-stop(100%,#46a3d7));
    background: -webkit-linear-gradient(top,#56bdf4 0,#46a3d7 100%);
    background: -o-linear-gradient(top,#56bdf4 0,#46a3d7 100%);
    background: -ms-linear-gradient(top,#56bdf4 0,#46a3d7 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#56BDF4',endColorstr='#46A3D7',GradientType=0);
    background: linear-gradient(top,#56bdf4 0,#46a3d7 100%);
}
#dialog_box .dialog_body .dialog_item button.bt_tip_normal{
	color: #535353;
    border: 1px solid #B4B4B4;
    background: #f4f3f4;
    background: -moz-linear-gradient(top,#f4f3f4 0,#dfdede 100%);
    background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#f4f3f4),color-stop(100%,#dfdede));
    background: -webkit-linear-gradient(top,#f4f3f4 0,#dfdede 100%);
    background: -o-linear-gradient(top,#f4f3f4 0,#dfdede 100%);
    background: -ms-linear-gradient(top,#f4f3f4 0,#dfdede 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#F4F3F4',endColorstr='#DFDEDE',GradientType=0);
    background: linear-gradient(top,#f4f3f4 0,#dfdede 100%);
}
</style>
<div class="mask" id="dialog_mask"></div>
<div class="dialog_box" id="dialog_box">
	<div class="dialog_head"><span class="dialog_head_text" id="dialog_head_text">弹窗信息</span><a href="javascript:;" class="dialog_close"><i class="fa fa-close"></i></a></div>
	<div class="dialog_body">
			<div class="dialog_item">
				<label class="dialog_label">导航名称</label>
				<div class="element">
				<input type="text" class="ipt nav_name" value=""  />				
				</div>
			</div>
			<div class="dialog_item">
				<label class="dialog_label">打开方式</label>
				<div class="element">
				<input type="hidden" name="openway" value="0"/>
					<a href="javascript:;" class="radio link self"><i class="fa fa-dot-circle-o"></i>本窗口打开</a>
					<a href="javascript:;" class="radio link blank"><i class="fa fa-circle-o"></i>新窗口打开</a>
				</div>
			</div>
			<div class="dialog_item">
				<label class="dialog_label">导航设置</label>
				<div class="element">
					<a href="javascript:;" class="radio config diy"><i class="fa fa-dot-circle-o"></i>自定义配置</a>
					<a href="javascript:;" class="radio config sys"><i class="fa fa-circle-o"></i>使用系统选项</a>				
				</div>
			</div>
			<div class="dialog_item" id="navsetContainer">
				<div id="diyset">
					<label class="dialog_label">导航链接</label><div class="element"><input type="text" name="" id="" class="ipt navlink"  placeholder="必须带http://或https://"/></div>
				</div>
				<!-- 如果是使用商品 -->
				<div id="sysset">
				
					<label class="dialog_label">商品链接</label>
					<div class="element">
						<select name="" >
							<option value="">请选择一类商品</option>
							<option value="11">man shoes</option>
							<option value="15">hats</option>
							<option value="12">womens</option>
						</select>
						<select name="" >
							<option value="">请先选择商品分类</option>
							<option value="">该分类下所有商品</option>
							<option value="11">goods name</option>
							<option value="15">goods name2</option>
							<option value="16">goods name3</option>
						</select>
					</div>
					
				</div>
				<!-- 如果是使用商品 -->
			</div>
			<div class="dialog_item">
				<label class="dialog_label">是否启用</label>
				<div class="element">
					<input type="hidden" name="isshow" value="0"/>
					<a href="javascript:;" class="radio show enable"><i class="fa fa-dot-circle-o"></i>启用</a>
					<a href="javascript:;" class="radio show unenable"><i class="fa fa-circle-o"></i>停用</a>	
				</div>
			</div>
			<div class="dialog_item bottom" style="margin-bottom: 0;">
				<button class="btn bt_tip_normal" >取消</button>
				<button class="btn bt_tip_hit">确定</button>
			</div>
	</div>
</div>
</body>
</html>
<script type="text/javascript">
jQuery.fn.center = function() {
	this.css("position", "fixed");
	this.css("top", ($(window).height() - this.height()) / 2 + "px");
	this.css("left", ($(window).width() - this.width()) / 2 + "px");
	return this;
};
var ori_ico='/assets/common/images/icons/colum1nx.gif';
var spread_ico='/assets/common/images/icons/colum1nx2.gif';
$('.formbody .tool a.spread').click(function (){
	if (!$(this).hasClass('sp')){
		$('table.table tr.tr_list').each(function (){		
			$(this).removeClass('none');
		});
		$('table.table tr').find('img.dragdown').attr('src', spread_ico);
		$(this).addClass('sp').text('隐藏所有下级导航');
	}else{
		$('table.table tr.tr_list').each(function (){		
			$(this).addClass('none');
		});
		$('table.table tr').find('img.dragdown').attr('src', ori_ico);
		$(this).removeClass('sp').text('展开所有下级导航');		
	}
})
$('table.table td img.dragdown').click(function(){
	spreadColumn($(this));
})
function spreadColumn($opObj,flag){
	var reg=/\d+/;
	var $op_index= parseInt($opObj.attr('id').match(reg));
	if($op_index % 1==0){
		var $op=$('table.table tr.tr_list.column_level_'+$op_index);
		if($op.hasClass('none')){
			if (!flag){
				$op.removeClass('none');
				$opObj.attr('src','/assets/common/images/icons/colum1nx2.gif');
			}
		}else{
			$op.addClass('none');
			$opObj.attr('src','/assets/common/images/icons/colum1nx.gif');
			$op.each(function (){
				var $img=$(this).find('img.dragdown');
				if ($img.length>0){
					spreadColumn($img,1);
				}
			})				
		}		
	}	
}

$('.formbody table.table td a.op_show').click(function(){
	if ($(this).hasClass('enabled')){
		$(this).removeClass('enabled');
		$(this).siblings('span.op_show_text').addClass('warn').removeClass('ok').text('停用');
	}else{
		$(this).addClass('enabled');		
		$(this).siblings('span.op_show_text').addClass('ok').removeClass('warn').text('启用');
	}
})


// 弹窗js

$('#dialog_box .dialog_body a.radio').click(function (){
	var $this=$(this), $operation=true;
	$this.find('i.fa').removeClass('fa-circle-o').addClass('fa-dot-circle-o').parent().siblings('a.radio').find('i.fa').removeClass('fa-dot-circle-o').addClass('fa-circle-o');
	if($this.hasClass('link')){
		var $way=0;
		if(! $(this).hasClass('self')){
			$way=1;
		}
		$(this).siblings('input[name="openway"]').val($way);		
	}else if ($this.hasClass('config')){
		if($this.hasClass('diy')){
			$('#dialog_box .dialog_body #navsetContainer #diyset').css('display','block');
			$('#dialog_box .dialog_body #navsetContainer #sysset').css('display','none').html('');
		}else if ($this.hasClass('sys')){
			$('#dialog_box .dialog_body #navsetContainer #sysset').css('display','block');
			$('#dialog_box .dialog_body #navsetContainer #diyset').css('display','none');			
			var $getHtml='<div style="height:35px; width:100%;text-align: center;"><img src="/assets/common/images/icons/loading.gif"  style="width:25px;vertical-align: middle; margin-right:5px; display: inline;"/>正在获取数据，请稍候…</div>'
			//$('#dialog_box .dialog_body #navsetContainer #sysset').html($getHtml);
			//ajax获取数据
		}else{
			$operation=false;
		}
	}else if ($this.hasClass('show')){
		var $on=1;
		if(! $(this).hasClass('enable')){
			$on=0;
		}
		$(this).siblings('input[name="isshow"]').val($on);	
	}else{
		$operation=false;
	}
	if ( ! $operation){
		easyDialog.open({
			  container : {
				header: '系统提示窗',
			    content : '无效操作，请刷新重试！'
			  },
			  autoClose : 2000
			});
	}
})
$('.formbody a.addnav').click(function (){
	openDialog();
})
$('#dialog_box .dialog_head a.dialog_close, #dialog_box .dialog_body .dialog_item button.bt_tip_normal').click(function (){
	closeDialog();
})
function openDialog(){
	$('#dialog_box').center();
	$('#dialog_mask').show();
	$('#dialog_box').show();	
}
function closeDialog(){
	$('#dialog_box').hide(100,function (){
		$('#dialog_mask').hide();
		dialogInit();
	});	
}
function dialogInit(){
	
}
	// end 弹窗js
</script>